package com.tedu.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.tedu.dao.IAddressDao;
import com.tedu.model.Address;
@Repository
public class AddressDao extends BaseDao<Address> implements IAddressDao {

	public List<Address> list(int uid) {
		List<Address> addresses = this.openSession().selectList(Address.class.getName() + ".list", uid);
		return addresses;
	}
	
	///////////////
	//新
		@Override
		public void updateAllStatus() {
			this.openSession().update(Address.class.getName() + ".updateAllStatus");
			
		}
		@Override
		public void updateOneStatus(int aid) {
			this.openSession().update(Address.class.getName() + ".updateOneStatus", aid);	
		}
		@Override
		public List<Address> commomList(int uid) {
			List<Address> addresses = this.openSession().selectList(Address.class.getName() + ".commomList", uid);
			return addresses;
		}
		@Override
		public List<Address> defaultList(int uid) {
			List<Address> addresses = this.openSession().selectList(Address.class.getName() + ".defaultList", uid);
			return addresses;
		}
		

}
